//
//  CheekVodeRequest.m
//  CheekiOS
//
//  Created by mac on 2017/7/7.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "CheekVodeRequest.h"

@implementation CheekVodeRequest

+(void)getCheekVodeSigType:(NSString *)Type
                   success:(void (^)(id sucess))success
                   failure:(void (^)(NSError * error))failure{
    NSDictionary *dict = @{
                           @"uid":[HQHttpManager getUserId],
                           @"type":Type
                           };
    [HcardManagerTool requestWithURLString:HttpUrlStringS(@"/video/videoOpenClose") parameters:dict type:HttpRequestTypePost success:^(id result) {
        if(success){
            if([result[@"code"] isEqualToString:@"ok"]){
                success(result);
            }
        }
    } failure:^(NSError * error ) {
        if (failure) {
            failure(error);
        }
    }];

}

+(void)getCheekVideoChatUid:(NSString *)Uid
                        lon:(NSString *)lon
                        lat:(NSString *)lat
                        sex:(NSString *)sex
                    success:(void (^)(id sucess))success
                    failure:(void (^)(NSError * error))failure{
    
    NSDictionary *dict = @{
                           @"uid":Uid,
                           @"lon":lon,
                           @"lat":lat,
                           @"sex":sex
                           };
    
    [HcardManagerTool requestWithURLString:HttpUrlStringS(@"/video/videoChat") parameters:dict type:HttpRequestTypePost success:^(id result) {
        if(success){
            if([result[@"code"] isEqualToString:@"ok"]){
                success(result);
            }
        }
    } failure:^(NSError * error ) {
        if (failure) {
            failure(error);
        }
    }];
 

}


+(void)getCheekVideoChatOver:(NSString *)uid
                     success:(void (^)(id sucess))success
                     failure:(void (^)(NSError * error))failure{
    
    NSDictionary *dict = @{
                           @"uid":uid
                           };
    
    [HcardManagerTool requestWithURLString:HttpUrlStringS(@"/video/videoChatOver") parameters:dict type:HttpRequestTypePost success:^(id result) {
        if(success){
            if([result[@"code"] isEqualToString:@"ok"]){
                success(result);
            }
        }
    } failure:^(NSError * error ) {
        if (failure) {
            failure(error);
        }
    }];
    

}

+(void)getCheekScreeningPayCharm:(NSString *)Uid
                           charm:(NSString *)charm
                         success:(void (^)(id sucess))success
                         failure:(void (^)(NSError * error))failure{

    NSDictionary *dict = @{
                           @"uid":Uid,
                           @"charm":charm
                           };
    
    [HcardManagerTool requestWithURLString:HttpUrlStringS(@"/video/payCharm") parameters:dict type:HttpRequestTypePost success:^(id result) {
        if(success){
            if([result[@"code"] isEqualToString:@"ok"]){
                success(result);
            }
        }
    } failure:^(NSError * error ) {
        if (failure) {
            failure(error);
        }
    }];

    

}

+ (void)getCheekVideoChatListUid:(NSString *)Uid
                            page:(NSInteger )page
                            rows:(NSInteger )rows
                         success:(void (^)(id sucess))success
                         failure:(void (^)(NSError * error))failure{

    NSDictionary *dict = @{
                           @"uid":Uid,
                           @"page":@(page),
                           @"rows":@(rows)
                           };
    
    [HcardManagerTool requestWithURLString:HttpUrlStringS(@"/video/videoChatList") parameters:dict type:HttpRequestTypePost success:^(id result) {
        if(success){
            if([result[@"code"] isEqualToString:@"ok"]){
                success(result);
            }
        }
    } failure:^(NSError * error ) {
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)getCheekDelVideoUid:(NSString *)uid
                        Wid:(NSString *)wid
                      empty:(NSString *)empty
                    success:(void (^)(id sucess))success
                    failure:(void (^)(NSError * error))failure{
    NSDictionary *dict = @{
                           @"uid":uid,
                           @"wid":wid,
                           @"empty":empty
                           };
    
    [HcardManagerTool requestWithURLString:HttpUrlStringS(@"/video/delVideo") parameters:dict type:HttpRequestTypePost success:^(id result) {
        if(success){
            if([result[@"code"] isEqualToString:@"ok"]){
                success(result);
            }
        }
    } failure:^(NSError * error ) {
        if (failure) {
            failure(error);
        }
    }];


}

+ (void)getCheekVideobeFriendUid:(NSString *)uid
                             Wid:(NSString *)wid
                           charm:(NSString *)charm
                         success:(void (^)(id sucess))success
                         failure:(void (^)(NSError * error))failure{
    NSDictionary *dict = @{
                           @"uid":uid,
                           @"wid":wid,
                           @"charm":charm
                           };
    
    [HcardManagerTool requestWithURLString:HttpUrlStringS(@"/video/beFriend20") parameters:dict type:HttpRequestTypePost success:^(id result) {
        if(success){
            if([result[@"code"] isEqualToString:@"ok"]){
                success(result);
            }
        }
    } failure:^(NSError * error ) {
        if (failure) {
            failure(error);
        }
    }];


}

+ (void)getCheekVideoisFriendUid:(NSString *)uid
                             Wid:(NSString *)wid
                         success:(void (^)(id sucess))success
                         failure:(void (^)(NSError * error))failure{
    NSDictionary *dict = @{
                           @"uid":uid,
                           @"wid":wid
                           };
    [HcardManagerTool requestWithURLString:HttpUrlStringS(@"/video/isFriend") parameters:dict type:HttpRequestTypePost success:^(id result) {
        if(result){
            if([result[@"code"] isEqualToString:@"ok"]){
                success(result);
            }
        }
    } failure:^(NSError * error ) {
        if (failure) {
            failure(error);
        }
    }];
    
}


+ (void)getCheekFriendRequestUid:(NSString *)Uid
                             Wid:(NSString *)Wid
                         success:(void (^)(id sucess))success
                         failure:(void (^)(NSError * error))failure{
    
    NSDictionary *dict = @{
                           @"uid":Uid,
                           @"wid":Wid
                           };
    [HcardManagerTool requestWithURLString:HttpUrlStringS(@"/friendRequest") parameters:dict type:HttpRequestTypePost success:^(id result) {
        if(success){
            if([result[@"code"] isEqualToString:@"ok"]){
                success(result);
            }
        }
    } failure:^(NSError * error ) {
        if (failure) {
            failure(error);
        }
    }];

}

+ (void)getCheekFriendHelloUid:(NSString *)Uid
                           Wid:(NSString *)Wid
                       success:(void (^)(id sucess))success
                       failure:(void (^)(NSError * error))failure{
    NSDictionary *dict = @{
                           @"uid":Uid,
                           @"wid":Wid
                           };
    [HcardManagerTool requestWithURLString:HttpUrlStringS(@"/hello") parameters:dict type:HttpRequestTypePost success:^(id result) {
        if(success){
            if([result[@"code"] isEqualToString:@"ok"]){
                success(result);
            }
        }
    } failure:^(NSError * error ) {
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)getCheekBeFriendUid:(NSString *)Uid
                        Wid:(NSString *)Wid
                    success:(void (^)(id sucess))success
                    failure:(void (^)(NSError * error))failure{


    NSDictionary *dict = @{
                           @"uid":Uid,
                           @"wid":Wid
                           };
    [HcardManagerTool requestWithURLString:HttpUrlStringS(@"/beFriend") parameters:dict type:HttpRequestTypePost success:^(id result) {
        if(success){
            if([result[@"code"] isEqualToString:@"ok"]){
                success(result);
            }
        }
    } failure:^(NSError * error ) {
        if (failure) {
            failure(error);
        }
    }];

}


+ (void)getCheekFriendhasTalkUid:(NSString *)Uid
                             Wid:(NSString *)Wid
                         success:(void (^)(id sucess))success
                         failure:(void (^)(NSError * error))failure{
    NSDictionary *dict = @{
                           @"uid":Uid,
                           @"wid":Wid
                           };
    [HcardManagerTool requestWithURLString:HttpUrlStringS(@"/video/hasTalk20") parameters:dict type:HttpRequestTypePost success:^(id result) {
        if(success){
            if([result[@"code"] isEqualToString:@"ok"]){
                success(result);
            }
        }
    } failure:^(NSError * error ) {
        if (failure) {
            failure(error);
        }
    }];


}

@end



